from core import BaseProtocal;

class ProtocalTypes:
    CS_ADD = 1
    SC_ADD = 2
    CS_SUB = 3
    SC_SUB = 4
    CS_MUL = 5
    SC_MUL = 6
    CS_DIV = 7
    SC_DIV = 8

class CSAddMessage(BaseProtocal):

    def __init__(self):
        BaseProtocal.__init__(self,ProtocalTypes.CS_ADD);
        
    def read(self,data):
        self.left = data[0];
        self.right = data[1];
        
class CSSubMessage(BaseProtocal):

    def __init__(self):
        BaseProtocal.__init__(self,ProtocalTypes.CS_SUB);
        
    def read(self,data):
        self.left = data[0];
        self.right = data[1];
        
class CSMulMessage(BaseProtocal):

    def __init__(self):
        BaseProtocal.__init__(self,ProtocalTypes.CS_MUL);
        
    def read(self,data):
        self.left = data[0];
        self.right = data[1];

class CSDivMessage(BaseProtocal):

    def __init__(self):
        BaseProtocal.__init__(self,ProtocalTypes.CS_DIV);
      
    def read(self,data):
        self.left = data[0];
        self.right = data[1];